package com.solution.model;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ExamCategoryLevelMapping
 */
@Entity
@Table(name="Exam_Category_Level_Mapping"
    ,schema="public"
)
public class ExamCategoryLevelMapping extends AbstractPO
 {

	
	private static final long serialVersionUID = 1L;
	
    private ExamCategoryLevelMappingId id;
    private LevelType levelType;
    private ExamType examType;
    private CategoryType categoryType;
    private Long numberQuestions;

     @EmbeddedId
    
    @AttributeOverrides( {
        @AttributeOverride(name="examTypeId", column=@Column(name="Exam_TypeID", nullable=false, precision=10, scale=0) ), 
        @AttributeOverride(name="categoryTypeId", column=@Column(name="Category_TypeID", nullable=false, precision=10, scale=0) ), 
        @AttributeOverride(name="levelTypeId", column=@Column(name="Level_TypeID", nullable=false, precision=10, scale=0) ) } )
    public ExamCategoryLevelMappingId getId() {
        return this.id;
    }
    
    public void setId(ExamCategoryLevelMappingId id) {
        this.id = id;
    }
    @ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="Level_TypeID", nullable=false, insertable=false, updatable=false)
    public LevelType getLevelType() {
        return this.levelType;
    }
    
    public void setLevelType(LevelType levelType) {
        this.levelType = levelType;
    }
    @ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="Exam_TypeID", nullable=false, insertable=false, updatable=false)
    public ExamType getExamType() {
        return this.examType;
    }
    
    public void setExamType(ExamType examType) {
        this.examType = examType;
    }
    @ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="Category_TypeID", nullable=false, insertable=false, updatable=false)
    public CategoryType getCategoryType() {
        return this.categoryType;
    }
    
    public void setCategoryType(CategoryType categoryType) {
        this.categoryType = categoryType;
    }
    
    @Column(name="Number_Questions", nullable=false, precision=10, scale=0)
    public Long getNumberQuestions() {
        return this.numberQuestions;
    }
    
    public void setNumberQuestions(Long numberQuestions) {
        this.numberQuestions = numberQuestions;
    }




}


